/**
 * 2018年12月23日下午9:13:28
 * @author 谢进财
 */
package com.baihang.project.ds.entity.dbMap;

import java.sql.ResultSet;
import java.sql.SQLException;

import org.springframework.jdbc.core.RowMapper;
import org.springframework.stereotype.Repository;

import com.baihang.project.ds.entity.MenuEntity;

/**
 * @author whati
 *
 */
@Repository
public class MenuEntityRowMapper implements RowMapper<MenuEntity> {

	/* (non-Javadoc)
	 * @see org.springframework.jdbc.core.RowMapper#mapRow(java.sql.ResultSet, int)
	 */
	@Override
	public MenuEntity mapRow(ResultSet rs, int rowNum) throws SQLException {
		MenuEntity  entity = new MenuEntity();
		entity.setId(rs.getInt("Menu_id"));
		entity.setIco(rs.getString("Menu_icon"));
		entity.setName(rs.getString("Menu_name"));
		entity.setOrder(rs.getInt("Menu_order"));
		entity.setParentid(rs.getInt("parentid"));
		entity.setUrl(rs.getString("Menu_url"));
		return entity;
	}

}
